﻿using IsmsExplorer.Model.AssetRegister;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using IsmsExplorer.Model.Projects;

namespace IsmsExplorer.UnitTests
{
    
    
    /// <summary>
    ///This is a test class for AssetTest and is intended
    ///to contain all AssetTest Unit Tests
    ///</summary>
    [TestClass()]
    public class AssetTest {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext {
            get {
                return testContextInstance;
            }
            set {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Asset Constructor
        ///</summary>
        [TestMethod()]
        public void AssetConstructorTest() {
            Asset a1 = new Asset(1, "Asset1", 5);
            Assert.AreEqual(1, a1.ID);
            Assert.AreEqual("Asset1", a1.Name);
            Assert.AreEqual(5, a1.ValueCIA);

            Asset a2 = new Asset(1, "Asset1", 5);
            // a1 and a2 are equal, but are they?
            Assert.IsTrue(a1 == a2);
            Assert.IsFalse(a1 != a2);
        }

        /// <summary>
        ///A test for Asset Constructor
        ///</summary>
        [TestMethod()]
        public void AssetConstructorTest1() {
            int id = 0; // TODO: Initialize to an appropriate value
            string name = string.Empty; // TODO: Initialize to an appropriate value
            int valueCIA = 0; // TODO: Initialize to an appropriate value
            Asset target = new Asset(id, name, valueCIA);
            //Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for Category
        ///</summary>
        [TestMethod()]
        public void CategoryTest() {
            Asset target = new Asset(); // TODO: Initialize to an appropriate value
            AssetCategory expected = null; // TODO: Initialize to an appropriate value
            AssetCategory actual;
            target.Category = expected;
            actual = target.Category;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Location
        ///</summary>
        [TestMethod()]
        public void LocationTest() {
            Asset target = new Asset(); // TODO: Initialize to an appropriate value
            Location expected = null; // TODO: Initialize to an appropriate value
            Location actual;
            target.Location = expected;
            actual = target.Location;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Owner
        ///</summary>
        [TestMethod()]
        public void OwnerTest() {
            Asset target = new Asset(); // TODO: Initialize to an appropriate value
            Role expected = null; // TODO: Initialize to an appropriate value
            Role actual;
            target.Owner = expected;
            actual = target.Owner;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Project
        ///</summary>
        [TestMethod()]
        public void ProjectTest() {
            Asset target = new Asset(); // TODO: Initialize to an appropriate value
            Project expected = null; // TODO: Initialize to an appropriate value
            Project actual;
            target.Project = expected;
            actual = target.Project;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ValueCIA
        ///</summary>
        [TestMethod()]
        public void ValueCIATest() {
            Asset target = new Asset(); // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            target.ValueCIA = expected;
            actual = target.ValueCIA;
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}

